<template>
  <div>

    <HeaderTop :enable-shadow="true" />
<!--    {{spotData}}-->

    <el-row>
      <el-col :span="2"><pre> </pre></el-col>
      <el-col :span="14" class="al-m-top-10px">
        <div class="al-box-container al-box-pretty">

          <TitleNode position="center" class=""
                     :title-text="spotData.title"
                     :title-text2="spotData.desc" />

          <div class="al-m-20px">
            <span class="el-icon-location-outline al-text-color-light-blue"></span>
            {{spotData.city}}
          </div>
          <div class="al-width-90">
            <div v-for="(item, index) in spotData.img_list"
                 :key="index"
                 class="">
              <ALImage class="al-width-100" :src="item" fit="cover" />
            </div>
          </div>

          <el-divider class=""></el-divider>


          <div class="al-box-container">
            <TitleNode position="center"
                       title-text2="想去这个地点拍照吗？快去发布约拍吧~" />
            <div>
              <el-button round plain
                         @click="goAddAppointmentPage(spotData.city + ' ' + spotData.title)"
                         class="">去发布约拍</el-button>
            </div>
          </div>
        </div>
      </el-col>

      <!--侧边栏-->
      <el-col :span="6" class="al-m-20px">
        <TitleNode position="left" title-text="最新打卡点推荐" />
        <SpotComponent :enable-pagination="false"
                       :enable-city="false"
                       class=""
                       mode="list-v" />
      </el-col>
      <el-col :span="2"><pre> </pre></el-col>
    </el-row>

    <ALFooter />
  </div>
</template>

<script>
  import HeaderTop from "../../components/public/HeaderTop";
  import ALFooter from "../../components/public/ALFooter";
  import ALImage from "../../components/public/ALImage";
  import TitleNode from "../../components/public/TitleNode";
  import SpotComponent from "./component/SpotComponent";
  import eventBus from "../../util/bus/eventBus";
  export default {
    name: "SpotDetail",
    //组件
    components: {SpotComponent, TitleNode, ALImage, ALFooter, HeaderTop},
    //属性
    props: {},

    //数据
    data() {
      return {
        spotData: this.$store.state.storeSpotData
      }
    },

    //挂载完成时
    mounted() {
      //this.getRecommendSpotData(this.spotData.city);
    },

    //方法
    methods: {

      goAddAppointmentPage(data){
        // eventBus.$emit("sendCity", data);
        this.gotoPage('/appointment/add/' + data);
      }
    },

    //计算属性
    computed: {},

    //监听
    watch: {}
  }
</script>

<style scoped>

</style>
